package com.binest.figureInclusionMain.service.impl;

import java.util.List;
import com.binest.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.binest.figureInclusionMain.mapper.FigureInclusionMainMapper;
import com.binest.figureInclusionMain.domain.FigureInclusionMain;
import com.binest.figureInclusionMain.service.IFigureInclusionMainService;

/**
 * 人物收录主Service业务层处理
 * 
 * @author wwd
 * @date 2024-01-18
 */
@Service
public class FigureInclusionMainServiceImpl implements IFigureInclusionMainService 
{
    @Autowired
    private FigureInclusionMainMapper figureInclusionMainMapper;

    /**
     * 查询人物收录主
     * 
     * @param id 人物收录主主键
     * @return 人物收录主
     */
    @Override
    public FigureInclusionMain selectFigureInclusionMainById(String id)
    {
        return figureInclusionMainMapper.selectFigureInclusionMainById(id);
    }

    /**
     * 查询人物收录主列表
     * 
     * @param figureInclusionMain 人物收录主
     * @return 人物收录主
     */
    @Override
    public List<FigureInclusionMain> selectFigureInclusionMainList(FigureInclusionMain figureInclusionMain)
    {
        return figureInclusionMainMapper.selectFigureInclusionMainList(figureInclusionMain);
    }

    /**
     * 新增人物收录主
     * 
     * @param figureInclusionMain 人物收录主
     * @return 结果
     */
    @Override
    public int insertFigureInclusionMain(FigureInclusionMain figureInclusionMain)
    {
        figureInclusionMain.setCreateTime(DateUtils.getNowDate());
        return figureInclusionMainMapper.insertFigureInclusionMain(figureInclusionMain);
    }

    /**
     * 修改人物收录主
     * 
     * @param figureInclusionMain 人物收录主
     * @return 结果
     */
    @Override
    public int updateFigureInclusionMain(FigureInclusionMain figureInclusionMain)
    {
        figureInclusionMain.setUpdateTime(DateUtils.getNowDate());
        return figureInclusionMainMapper.updateFigureInclusionMain(figureInclusionMain);
    }

    /**
     * 批量删除人物收录主
     * 
     * @param ids 需要删除的人物收录主主键
     * @return 结果
     */
    @Override
    public int deleteFigureInclusionMainByIds(String[] ids)
    {
        return figureInclusionMainMapper.deleteFigureInclusionMainByIds(ids);
    }

    /**
     * 删除人物收录主信息
     * 
     * @param id 人物收录主主键
     * @return 结果
     */
    @Override
    public int deleteFigureInclusionMainById(String id)
    {
        return figureInclusionMainMapper.deleteFigureInclusionMainById(id);
    }

    @Override
    public int addLikeCount(String id) {
        return figureInclusionMainMapper.addLikeCount(id);
    }

    @Override
    public int reduceLikeCount(String id) {
        return figureInclusionMainMapper.reduceLikeCount(id);
    }

    @Override
    public int addNoLikeCount(String id) {
        return figureInclusionMainMapper.addNoLikeCount(id);
    }

    @Override
    public int reduceNoLikeCount(String id) {
        return figureInclusionMainMapper.reduceNoLikeCount(id);
    }
}
